package org.lucava.boatskeeper.client.event.user;

import com.google.gwt.event.shared.GwtEvent;

public class EditUserEvent extends GwtEvent<UserHandler> {

    public static GwtEvent.Type<UserHandler> TYPE = new GwtEvent.Type<UserHandler>();
    private final Integer id;

    public EditUserEvent(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    @Override
    public GwtEvent.Type<UserHandler> getAssociatedType() {
        return TYPE;
    }

    @Override
    protected void dispatch(UserHandler handler) {
        handler.onEditUser(this);
    }
}